day 01 - 7110 [general]

day one - 7110

Santa is stranded on the Christmas Islands and is desperately trying to reach his trusty companion via cellphone. We've bugged the device with a primitive keylogger and have been able to decode some of the SMS, but couldn't make much sense of the last one. Can you give us a hand?

Recon

Text messages are multitap 'cipher' on a phone, seemingly in format timestamp,key

Using dcode.fr/multitap-abc-cipher we get:

ALRIGHT PAL HERS AE/ADD D YE FLAG GOOOMD LUCJ ENTER A A A A A A A D K D D D D D DING IT/HGT WITH THORPE/THOSE HOOVES LOL ITS AOTW LEETS DR NK/MMK S MDF/MEE/MFD EHOOOG G Y U CRIGZY EEFER M L P

Code

Quick buggy parser:

N7110_KEYPAD_KEYS =  {
    0: "N7110_KEYPAD_ZERO",
    1: "N7110_KEYPAD_ONE",
    2: "N7110_KEYPAD_TWO",
    3: "N7110_KEYPAD_THREE",
    4: "N7110_KEYPAD_FOUR",
    5: "N7110_KEYPAD_FIVE",
    6: "N7110_KEYPAD_SIX",
    7: "N7110_KEYPAD_SEVEN",
    8: "N7110_KEYPAD_EIGHT",
    9: "N7110_KEYPAD_NINE",
    10: "N7110_KEYPAD_STAR",
    11: "N7110_KEYPAD_HASH",
    100: "N7110_KEYPAD_MENU_LEFT",
    101: "N7110_KEYPAD_MENU_RIGHT",
    102: "N7110_KEYPAD_MENU_UP",
    103: "N7110_KEYPAD_MENU_DOWN",
    104: "N7110_KEYPAD_CALL_ACCEPT",
    105: "N7110_KEYPAD_CALL_REJECT"
}

N7110_IME_METHODS = {
        0: "N7110_IME_T9",
        1: "N7111_IME_T9_CAPS",
        2: "N7110_IME_ABC",
        3: "N7110_IME_ABC_CAP"
}

chars = {
        "0":  " 0",
    "1":  ".,'?!\"1-()@/:",
    "2":  "abc2",
    "3": "def3",
    "4" : "ghi4",
    "5" : "jkl5",
    "6" :  "mno6",
    "7" :"pqrs7",
    "8" :"tuv8",
    "9" : "wxyz9",
    "10" : "@/:_;+&%*[]{}", #star
    "11": N7110_IME_METHODS #hash
}


log = []
res = []

with open("4.csv", "r") as f:
    log = f.readlines()

curchr = "0"
curlen = 0
IME_MODE = 0
prev = 0
for line in log:
    line = line.strip().split(',')
    x = line[1]
    now = line[0]
    delta = int(now) - int(prev)
    print("<{}> Checking {}".format(delta, x))

    if x != curchr or delta > 1000:
        if x == "11":
            IME_MODE = (IME_MODE + 1) % 4
        elif int(curchr) < 11:
            #if IME_MODE > 0:
                #res.append("<{}>".format(N7110_IME_METHODS[IME_MODE]))
                #IME_MODE = 0
            #else:
            if curchr != "":
                while curlen >= len(chars[curchr]):
                    res.append(chars[curchr][curlen % len(chars[curchr])])
                    curlen = curlen % len(chars[curchr])
                res.append(chars[curchr][curlen])
        else:
            #res.append("<{}>".format(N7110_KEYPAD_KEYS[int(x)]))
            pass
        curchr = x
        curlen = -1
    curlen += 1
    prev = now

print(''.join(res))

Output:

alright pal herse ye flag goood lucj enterking it with those hooves lol its aotw{l3ts_dr1nk__s0m3_eggnnog0g_y0u_cr4zy_d33r}0m.. .l ,p

Slightly incorrect as it doesn't take timestamps into account and the modulo doesn't work correctly in all instances.

Flag

AOTW{l3ts_dr1nk_s0m3_eggn0g_y0u_cr4zy_d33r}